@let license = licenseInfo();
@if (hasLicense() && license) {
  <div
    class="sys-license-wrapper"
  >
    <div class="sys-info-row">
      <span class="label">{{ 'Features' | translate }}:</span>
      <span class="value">{{ license.features.join(', ') }}</span>
    </div>
    <div class="sys-info-row">
      <span class="label">{{ 'Contract Type' | translate }}:</span>
      <span class="value">{{ getLabelForContractType(license.contract_type) }}</span>
    </div>
    <div class="sys-info-row">
      <span class="label">{{ 'Expiration Date' | translate }}:</span>
      <span class="value">{{ license.expiration_date }}
        @if (license.daysLeftinContract > 0) {
          <span>
            ({{ 'expires in {n, plural, one {# day} other {# days} }' | translate: { n: license.daysLeftinContract } }})
          </span>
        }
        @if (license.daysLeftinContract === 0) {
          <span>
            ( {{ 'EXPIRES TODAY' | translate }} )
          </span>
        }
        @if (license.daysLeftinContract < 0) {
          <span>
            ( {{ 'EXPIRED' | translate }} )
          </span>
        }
      </span>
    </div>
    <div class="sys-info-row">
      <span class="label">{{ 'Model' | translate }}:</span>
      <span class="value">{{ license.model || systemInfo().model }}</span>
    </div>
    @if (systemInfo().system_serial) {
      <div class="sys-info-row">
        <span class="label">{{ 'System Serial' | translate }}:</span>
        <span class="value">{{ systemInfo().system_serial }}</span>
      </div>
    }
    @if (license.system_serial || license.system_serial_ha) {
      <div class="sys-info-row">
        <span class="label">{{ 'Licensed Serials' | translate }}:</span>
        <span class="value">
          @if (license.system_serial) {
            <span>{{ license.system_serial }}</span>
          }
          @if (license.system_serial && license.system_serial_ha) {
            <span> / </span>
          }
          @if (license.system_serial_ha) {
            <span>{{ license.system_serial_ha }}</span>
          }
        </span>
      </div>
    }
    @if (license.add_hardware) {
      <div class="sys-info-row">
        <span class="label">{{ 'Additional Hardware' | translate }}:</span>
        <span class="value">{{ license.add_hardware }}</span>
      </div>
    }
  </div>
} @else {
  <div class="sys-info-wrapper">
    <div class="sys-info-row">
      <span class="label">{{ 'OS Version' | translate }}:</span>
      <span class="value">{{ systemInfo().version }}</span>
    </div>
    <div class="sys-info-row">
      <span class="label">{{ 'Product' | translate }}:</span>
      <span class="value">{{ systemInfo().system_product }}</span>
    </div>
    @if (systemInfo().model) {
      <div class="sys-info-row">
        <span class="label">{{ 'Model' | translate }}:</span>
        <span class="value">{{ systemInfo().model }}</span>
      </div>
    }
    @if (systemInfo().memory) {
      <div class="sys-info-row">
        <span class="label">{{ 'Memory' | translate }}:</span>
        <span class="value">{{ systemInfo().memory }}</span>
      </div>
    }
    @if (systemInfo().system_serial) {
      <div class="fn-sys-info-row">
        <span class="label">{{ 'System Serial' | translate }}:</span>
        <span class="value">{{ systemInfo().system_serial }}</span>
      </div>
    }
  </div>
}

